// No spam e-mail address
function noSpam(a,b,c) {
	document.write('<a href="mai'+'lto:'+c+'@'+b+'.'+a+'">'+c+'@'+b+'.'+a+'</a>');
}

// Check form-fields
function check_form(c) {
	switch(c) {
		case "contact":
			d = document[c];
			a = [d.cnt_message.value];	
			b = ["Your message here."]
		break;
	}
	err = 0;
	for (var i = 0; i < b.length; i++) {
		if (a[i] == b[i]) {
			err = 1;
			break;
		} else if (b[i]=="E-mail") {
			if (!check_email(a[i])){
				err = 1;
				break;
			}
		}
	}
	if (err) {
		b = "error";
	} else {
		b = "ok";
	}
	d[c+"_msg"].value = b;
	d.submit();
}

function check_email(str) {
	var supported = 0;
	if (window.RegExp){
		var tempStr = "a";
		var tempReg = new RegExp(tempStr);
		if (tempReg.test(tempStr)) supported = 1;
	}
	if (!supported) {
		return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
	}
	var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
	var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
	return (!r1.test(str) && r2.test(str));
}

// Flash maker v2 (edited)
function prntFlash(a,b,c,d,e,f) {
	var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+a+'" height="'+b+'" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
	+ '<param name="movie" value="'+d+'.swf" /><param name="FlashVars" value="'+e+'" /><param name="loop" value="true" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="scale" value="exactfit" /><param name="wmode" value="'+f+'" />'
	+ '<embed src="'+d+'.swf" flashvars="'+e+'" name="movie" loop="true" menu="false" quality="high" swLiveConnect="true" width="'+a+'" height="'+b+'" scale="exactfit" wmode="'+f+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>';
	document.write(oeTags);
}